﻿#if __ANDROID__
#region File and License Information
/*
<File>
	<License>
		Copyright © 2009 - 2017, Daniel Vaughan. All rights reserved.
		This file is part of Calcium (http://calciumsdk.net), 
		which is released under the MIT License.
		See file /Documentation/License.txt for details.
	</License>
	<CreationDate>$CreationDate$</CreationDate>
</File>
*/
#endregion

using Android.App;
using Android.Content;

namespace Outcoder.Services.Implementation
{
	public class ClipboardService : IClipboardService
	{
		public void CopyToClipboard(string text, string description)
		{
			var context = Application.Context;
			var clipboardManager = (ClipboardManager)context.GetSystemService(Application.ClipboardService);
			ClipData clipData = ClipData.NewPlainText(description, text);
			clipboardManager.PrimaryClip = clipData;
		}
	}
}

#endif